<template>
    <!-- 题目卡片 -->
    <view class="container">
        <Empty v-if="!list || list.length == 0"></Empty>
        <PracticeRecordCard v-for="(item, index) in list" :key="index" :item="item"></PracticeRecordCard>
    </view>

</template>
<script setup lang="ts">
import Empty from '@/components/Empty.vue';
import PracticeRecordCard from '../components/PracticeRecordCard.vue';
import type { QuestionRecord } from '@/type/question';
import { onLoad } from '@dcloudio/uni-app';
import { API_getExerciseSet } from '@/service/home';
import { ref } from 'vue';
const list = ref<QuestionRecord[]>([]);
const getExerciseSet = async () => {
    const res = await API_getExerciseSet();
    list.value = res.data;
    console.log(res.data);
}
onLoad(async () => {
    await getExerciseSet();
})
</script>
<style scoped lang="scss">
.container {

    padding: 20rpx;

    .title {
        font-size: 30rpx;
        color: #333;
        margin: 20rpx;
    }
}
</style>
